//
//  TableViewCell.m
//  富文本测试
//
//  Created by 生龙 on 16/4/15.
//  Copyright © 2016年 龙. All rights reserved.
//

#import "TableViewCell.h"
#import "YYLabel.h"
#import "UIImageView+WebCache.h"
@interface TableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet YYLabel *contentStr;
@property (weak, nonatomic) IBOutlet UIButton *rightButton;
@property (weak, nonatomic) IBOutlet UILabel *name;

@end

@implementation TableViewCell


- (void)setDataModel:(DataModel *)dataModel{

    _dataModel                     = dataModel;
    self.name.text                 = dataModel.name;
    self.contentStr.attributedText = dataModel.attrStr;
    UIImage *holderImage           = [UIImage imageNamed:@"timg"];
    NSURL *iconUrl                 = [NSURL URLWithString:dataModel.iconStr];
    [self.iconView sd_setImageWithURL:iconUrl placeholderImage:holderImage];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
